Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Looped requests cause page crashes #3034

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lkk214
Copy link
Contributor

@lkk214 lkk214 commented Nov 22, 2024

Description

Looped jetbrains/isOSREnabled requests cause page crash in JetBrains.

Copy link

netlify bot commented Nov 22, 2024

Deploy Preview for continuedev failed. Why did it fail? →

Name Link
🔨 Latest commit 45f931d
🔍 Latest deploy log https://app.netlify.com/sites/continuedev/deploys/674011cbbe9f99000845e0a9

@sestinj
Copy link
Contributor

sestinj commented Nov 23, 2024

@lkk214 this looks like just a rename, can you elaborate on the solution?

@lkk214
Copy link
Contributor Author

lkk214 commented Nov 23, 2024

@sestinj Okay, I changed this because the following steps would result in an infinite loop of requests.

To elaborate further, the steps involved are as follows:

  1. There is an attribute isOSREnabled in TipTapEditor, which sends a request with a messageType of jetbrains/isOSREnabled to the ide when it is rendered, and registers an eventListener about jetbrains/isOSREnabled in the webview.
  2. The ide receives this request and processes it, after which the ide sends a response with a messageType of jetbrains/isOSREnabled to the web.
  3. The eventListener receives the result of jetbrains/isOSREnabled from the ide, and executes ideMessenger.respond to return a request with a messageType of jetbrains/isOSREnabled to the ide.

Obviously, they are in an endless loop, which eventually causes page freezes, slow LLM output, and even page crashes.

Additionally, It is worth mentioning that each dialog box will request multiple repeated jetbrains/isOSREnabled. If there are multiple dialog boxes on the page, there will be too many unnecessary requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants